//
//  ButtonView.m
//  PlayADS
//
//  Created by 周莹 on 15/12/21.
//  Copyright © 2015年 周莹. All rights reserved.
//
#import "Colours.h"
#import "ButtonView.h"
#define Phight   [UIScreen mainScreen].bounds.size.height
#define Pwidth    [UIScreen  mainScreen].bounds.size.width
#define y    15
#define zwith  70
#define Zhight 35


@implementation ButtonView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = [UIColor greenColor];
      
        //        [self calculateHeightWithString:self.activity.address];
    }
    return self;
}

-(instancetype)initWithFrame:(CGRect)frame  withTextLabel:(NSString*)textLabel1 withTextLabel:(NSString*)textLabel2 withTextLabel:(NSString*)textLabel3 withTextLabel:(NSString*)textLabel4{

    self = [super initWithFrame:frame];
    if (self)
    {
        CGFloat feedW = AllWidtch-300;
        CGFloat feedH = SCALE_WIDTH(30);
        CGFloat feedX = (AllWidtch - feedW) * 0.1;
        CGFloat feedY = 10;
        
        
    self.button1 = [[UIButton  alloc] initWithFrame:CGRectMake(feedX, feedY, feedW , feedH)];
    //self.button1 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
        [self.button1  setTitle:textLabel1 forState:UIControlStateNormal];
        
        [self.button1 setTitleColor:[UIColor  blackColor] forState:UIControlStateNormal];
    self.button1.backgroundColor = [UIColor  greenColor];
    
    [self  addSubview:self.button1];
    
    
    
    self.button2 = [[UIButton  alloc] initWithFrame:CGRectMake(CGRectGetMaxX(self.button1.frame )+10, y, zwith, Zhight)];
    //[self.button2 setTitle:@"男" forState:UIControlStateNormal];
    [self.button2 setTitle:textLabel2 forState:UIControlStateNormal];
    
    self.button2.backgroundColor = [UIColor  blueColor];
    
    
    [self  addSubview:self.button2];
    
    
    
    
    
    

    self.button3 = [[UIButton  alloc] initWithFrame:CGRectMake(CGRectGetMaxX(self.button2.frame )+10, y, zwith, Zhight)];
   [self.button3  setTitle:textLabel3 forState:UIControlStateNormal];
        self.button3.backgroundColor = [UIColor  blueColor];
    
    [self  addSubview:self.button3];
    
        
        
        
        
        

    self.button4 = [[UIButton  alloc] initWithFrame:CGRectMake(CGRectGetMaxX(self.button3.frame )+10, y, zwith, Zhight)];
        
           [self.button4  setTitle:textLabel4 forState:UIControlStateNormal];
        self.button4.backgroundColor = [UIColor  blueColor];
    
    
    [self  addSubview:self.button4];
    
   
    
}


    return self;
}





@end
